// ignore_for_file: constant_identifier_names
// ignore: non_constant_identifier_names
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';

import '../service/config.dart';

class AppConstant {
  /// App运行在Release环境时，inProduction为true；当App运行在Debug和Profile环境时，inProduction为false
  static const bool inProduction = kReleaseMode; //本地打包的编译环境是 Debug 还是 Release （自动生成，不需手动修改）

  static const String theme = 'AppTheme';
  static const String locale = 'locale';

  // 本地SP存储key
  static const storageFirstOpen = 'first_open'; //第一次打开-需要协议弹窗
  static const storageGuideFirst = 'guide_first'; //是否经历过Guide
  static const storageToken = 'token'; //用户的Token
  static const searchJobHistoryRecord = 'search_job_history_record'; //兼职工作搜索记录
  static const storagedarkmodel = 'storage_dark_model'; //应用设置的暗黑模式
  static const storageNotificationEnable = 'storage_notification_enable'; //应用设置的推送是否开启
  static const storageDeviceUUID = 'storage_device_uuid'; //设备的UUID

  //消息通知Key
  static const eventProfile2Refresh = 'event_profile_refresh'; //通知用户信息需要刷新
  static const eventProfileRefreshFinish = 'event_profile_refresh_finish'; //用户信息已刷新完成
  static const eventReportIssueSuccess = 'event_report_issue'; //工作意见报告提交成功
  static const eventHomeDataRefresh = 'event_home_data_refresh'; //只刷新首页的数据

  // navbar 导航栏高度
  static const double navBarHeight = kToolbarHeight;
  // tabbar  高度 (pt)
  static const double tabBarHeight = 44;

  // ignore: non_constant_identifier_names
  static get bodyheight_hasTabar_hasBottomBar =>
      ConfigService.to.mSize!.height -
      ConfigService.to.safeAreaPaddingTop -
      kToolbarHeight -
      tabBarHeight -
      kBottomNavigationBarHeight;

  // ignore: non_constant_identifier_names
  static get bodyheight_noTabar_noBottomBar =>
      ConfigService.to.mSize!.height - ConfigService.to.safeAreaPaddingTop - kToolbarHeight;

  // ignore: non_constant_identifier_names
  static get bodyheight_hasTabar_noBottomBar =>
      ConfigService.to.mSize!.height - ConfigService.to.safeAreaPaddingTop - kToolbarHeight - tabBarHeight;

  static get bodyheight_noTabar_hasBottomBar =>
      ConfigService.to.mSize!.height -
      ConfigService.to.safeAreaPaddingTop -
      kToolbarHeight -
      kBottomNavigationBarHeight;
}
